import { create } from "zustand";

type State = {
  person: number;
};

type Actions = {
  addPerson: () => void;
  removeAllBears: () => void;
};

export const usePersonStore = create<State & Actions>((set) => ({
  person: 0,
  addPerson: () => set((state) => ({ person: state.person + 1 })),
  removeAllBears: () => set({ person: 0 })
}));